﻿<%@ Page Title="Edit Item" Language="C#" MasterPageFile="~/Resources/AAMMaster.master"
    AutoEventWireup="true" CodeBehind="edititem.aspx.cs" Inherits="LMKJ.edititem" %>

<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="form_name">
        Item Management</div>
    <table style="width: 100%">
        <tr>
            <td colspan="2">
                <asp:CustomValidator ID="fieldsValidator" runat="server" OnServerValidate="fieldsValidator_ServerValidate"
                    Display="Dynamic" ErrorMessage="Some required fields are empty! All required fields must be completed to edit item!"
                    ForeColor="Red" ValidationGroup="EditItem"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td>
                <b>Item Name </b>
            </td>
            <td>
                <asp:Label ID="itemNameLbl" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <b>Description</b>
            </td>
            <td>
                <asp:TextBox ID="descriptionTbx" runat="server" Width="100%" Height="100px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <b>Price*</b>
            </td>
            <td>
                $
                <asp:TextBox ID="dollarsTbx" runat="server" MaxLength="3" Width="30px"></asp:TextBox>
                .
                <asp:TextBox ID="centsTbx" runat="server" MaxLength="2" Width="20px"></asp:TextBox>
                <asp:CustomValidator ID="priceValidator" runat="server" OnServerValidate="priceValidator_ServerValidate"
                    Display="Dynamic" ErrorMessage="Price contains invalid characters or is empty!" ForeColor="Red"
                    ValidationGroup="EditItem"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <b>*Required Fields</b>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="confirmBtn" runat="server" Text="Confirm Changes" OnClick="confirmBtn_Click"
                    CssClass="buttonConfirmChanges" ValidationGroup="EditItem" />
                <asp:Button ID="cancelBtn" runat="server" Text="Cancel Changes" OnClick="cancelBtn_Click"
                    CssClass="buttonCancelChanges" CausesValidation="False" />
                <asp:Button ID="deleteBtn" runat="server" Text="Delete Item" OnClick="deleteBtn_Click"
                    CssClass="buttonDeleteItem" CausesValidation="False" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="confirmationLbl" Text="Are you sure you want to delete this item?<br />Warning: You will not be able to retrieve it back!"
                    runat='server' Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                <br />
                <asp:Button ID="confirmationBtn" Text="Confirm" runat="server" Visible="false" OnClick="confirmationBtn_Click"
                    CssClass="buttonConfirm" />
            </td>
        </tr>
    </table>
</asp:Content>
